package com.example.modellol;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

public class SettingActivity extends AppCompatActivity {

    private ImageView set_b;
    private String data;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);
        data=getIntent().getStringExtra("data");
        set_b=findViewById(R.id.sz_swipe_left);

        set_b.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(SettingActivity.this, "返回成功", Toast.LENGTH_SHORT).show();
                Intent intent=new Intent();
                if(data.equals("HomeActivity")){
                      intent.setClass(SettingActivity.this,HomeActivity.class);
                }
                if(data.equals("MineActivity")){
                    intent.setClass(SettingActivity.this,MineActivity.class);
                }
                startActivity(intent);
            }
        });
    }
}